package com.itheima.d6_singleInstance.repeatPractice.hungrySingleInstance;

public class Friend {
    private String name;

    private static Friend friend = new Friend();

    private Friend() {
        name = "兮";
    }

    public static Friend getInstance() {
        return friend;
    }

    public void show() {
        System.out.println("我的朋友是：" + name);
    }
}
